package com.kpf.springcloud.controller;

import com.kpf.springcloud.common.ResultJson;
import com.kpf.springcloud.service.FeignClientUserServer;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shiwen
 * @date 2021/3/7
 */
@RestController
@Api(value = "点赞相关接口", description = "点赞相关接口") //swagger接口配置
public class LikeConsumerController {

    @Autowired
    private FeignClientUserServer feignClientUserServer;

    /**
     * 点赞帖子 - 需要登陆
     *
     * @param topicId
     * @param status
     * @return
     */
    @PostMapping("/consumer/like/likeTopic")
    public ResultJson likeTopic(@RequestParam(value = "topicId") int topicId, @RequestParam(value = "status") int status) {
        return feignClientUserServer.likeTopic(topicId, status);
    }

}